#ifndef SHAPE_H
#define SHAPE_H

#include <iostream>
#include <vector>

namespace Foo {

    class Shape {
    public:
        enum Type {
            Rectangle,
            Triangle,
        };

        explicit Shape(Type type);
        virtual ~Shape();

        Type type() const;

        virtual int area() const = 0;

    private:
        int t;
    };

    class Rectangle : public Shape {
    public:
        Rectangle();
        Rectangle(int w, int h);

        int width() const;
        void setWidth(int width);

        int height() const;
        void setHeight(int height);

        int area() const override;

    private:
        int w, h;
    };

    class Triangle : public Shape {
    public:
        Triangle();
        Triangle(int a, int b, int c);

        bool isValid() const;
    
        std::vector<int> sizes() const;
        void setSizes(int a, int b, int c);

        int area() const override;

    private:
        int a, b, c;
    };

}

#endif // SHAPE_H
